package net.tolkv.tdd;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;


public class Store {
	private Map<UUID,Item> items;
	
	public Store() {
		super();
		this.items = new HashMap<UUID,Item>();
	}

	public void addItem(Item item){
		this.items.put(item.getId(), item);
	}
	
	public Collection<Item> getItems(){
		return this.items.values();
	}

	public void sellItem(Item a) {
		items.remove(a.getId());
	}

	public Item findItem(Item a) {
		return items.get(a.getId());
	}
	
	public Item findItem(UUID id){
		return items.get(id);
	}
	
}
